'use client'
import Script from 'next/script'

export default function GlobalHead() {
  return (
    <>
      <Script src="https://www.googletagmanager.com/gtag/js?id=G-H61YXNF6EP" strategy="beforeInteractive" />
      <Script id="ga" strategy="beforeInteractive">
        {`
        window.dataLayer = window.dataLayer || []
        function gtag() {
          dataLayer.push(arguments)
        }
        gtag('js', new Date())

        gtag('config', 'G-H61YXNF6EP')
        gtag('config', 'AW-16493707962');
        `}
      </Script>
      <Script id="clarity_script" strategy="beforeInteractive">
        {`
        (function(c,l,a,r,i,t,y){
            c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
            t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
            y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
        })(window, document, "clarity", "script", "n1odr888ct");
        `}
      </Script>
      <Script id="tawk_script" strategy="beforeInteractive">
        {`
        var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
        (function(){
        var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
        s1.async=true;
        s1.src='https://embed.tawk.to/6693a64832dca6db2caf28af/1i2oc33ik';
        s1.charset='UTF-8';
        s1.setAttribute('crossorigin','*');
        s0.parentNode.insertBefore(s1,s0);
        })();
        `}
      </Script>
    </>
  )
}
